package binary;

public class HexDemo {
    public static void main(String[] args) {
        int n = 0x2fd47d;
        int m = 0b10_1111_1101_0100_0111_1011;
        System.out.println(Integer.toBinaryString(n));//按2进制输出
        System.out.println(Integer.toBinaryString(m));//按2进制输出
        System.out.println(Integer.toHexString(n));//按16进制输出
        System.out.println(Integer.toHexString(m));//按16进制输出
        System.out.println(n);//按10进制输出
        System.out.println(m);//按10进制输出
    }
}
